Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli-tool: generate github contribution reports using the Github GraphQL api #361

Merged
merged 8 commits into from
Dec 15, 2024

Conversation

dhiller
Copy link
Contributor

@dhiller dhiller commented Dec 2, 2024

What this PR does / why we need it:

We have had several cases leading to extensive discussions over removing users from either the org or from an OWNERS file. We are constantly struggling with providing evidence about whether a user is really inactive whenever we have the gut feeling that they are.

We want to avoid having inactive reviewers and inactive org members, since:

  1. inactive reviewers are holding up contributors from getting their PRs reviewed and approved, forcing them to ping people. In the worst case those aren't active any more and might even ignore the ping.
  2. org membership comes with elevated privileges (i.e. automatic runs of test lanes and being able to lgtm PRs), which we want to reserve for people with active contribution status.

This tool tries to help with the above problems, offering to tackle three use cases:

  • fetching contribution data for a specific user
  • checking activity from contribution data for the members of an org (given by orgs.yaml)
  • checking activity from contribution data for reviewers and approvers (given an OWNERS file)

Detailed information in the README: https://github.com/dhiller/community/tree/create-user-activity-tool/generators/cmd/contributions/README.md

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #359

Special notes for your reviewer:

@kubevirt-bot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Dec 2, 2024
@dhiller dhiller force-pushed the create-user-activity-tool branch 2 times, most recently from 294d78b to 2907ee1 Compare December 2, 2024 11:53
@dhiller dhiller force-pushed the create-user-activity-tool branch 3 times, most recently from d084a10 to cff1d99 Compare December 2, 2024 16:37
@dhiller dhiller force-pushed the create-user-activity-tool branch from cff1d99 to c32c307 Compare December 2, 2024 16:50
@dhiller dhiller force-pushed the create-user-activity-tool branch from c32c307 to f5b79af Compare December 2, 2024 17:05
@dhiller dhiller changed the title WIP add user activity tool with GraphQL add user activity tool with GraphQL Dec 2, 2024
Signed-off-by: Daniel Hiller <[email protected]>
We add parsing of orgs.yaml and check members from the org, whether they
have any contributions.

Signed-off-by: Daniel Hiller <[email protected]>
Further:
* refactorings/renamings
* more detailed reporting
* support of a report output file in yaml

Signed-off-by: Daniel Hiller <[email protected]>
Adds support of resolving aliases from the default OWNERS_ALIASES if
it's in the same directory or from an aliases file in a given file path

Signed-off-by: Daniel Hiller <[email protected]>
Also rename a func.

Signed-off-by: Daniel Hiller <[email protected]>
@dhiller dhiller marked this pull request as ready for review December 5, 2024 15:20
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 5, 2024
@dhiller dhiller changed the title add user activity tool with GraphQL github contribution report - create user contribution reports using the Github GraphQL api Dec 5, 2024
@dhiller dhiller changed the title github contribution report - create user contribution reports using the Github GraphQL api github contribution reports using the Github GraphQL api Dec 5, 2024
@dhiller dhiller changed the title github contribution reports using the Github GraphQL api cli-tool: generate github contribution reports using the Github GraphQL api Dec 5, 2024
@aburdenthehand
Copy link
Member

/lgtm
In truth it looks amazing to me, but I don't think that is a functioning label.

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 12, 2024
@vladikr
Copy link
Member

vladikr commented Dec 15, 2024

I like this :)
Thank you very much @dhiller !
/approve

@kubevirt-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vladikr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 15, 2024
@kubevirt-bot kubevirt-bot merged commit ac395c3 into kubevirt:main Dec 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a tool to find inactive reviewers and approvers for a repository.
4 participants